Many computer-related programs benefit from asynchronous operation or multithreaded operation. As a typical example, an application's user interface (UI) input and output will not appear fluid to the user if the application blocks awaiting a relatively slow task to complete.
In a multithreaded environment, work can be done by a different thread while awaiting task completion. However, some single-threaded applications, such as those written in JavaScript®, do not provide for multithreaded operation. Further, thread switching may not be particularly efficient in many situations. Thus, thread switching may not be available or desirable for a given program or part of a program.